<?php
namespace app\admin\validate;

use think\Validate;

class Recharge extends Validate
{
    protected $rule = [
		'order'  => 'require|unique:recharge',
        'user_id' => 'require|number',
        'mobile' => 'require|mobile',
        'money' => 'require|number',
    ];

    protected $message = [
		'order.require'	   => '{%order_reruire}',
		'order.unique'	   => '{%order_unique}',
        'user_id.require' => '{%user_require}',
        'mobile.require' => '{%mobile_require}',
        'money.require' => '{%money_require}',

    ];

    protected $scene = [
        'add'   => ['order', 'user_id', 'mobile', 'money'],
        'edit'  => ['user_id','mobile','money'],
    ];
}